package com.df.ez_game.server.logic.status_sync.controllers.entity;

/**
 * 玩家状态类 - 用于状态同步的数据传输对象
 */
public class PlayerState {
    private long id;          // 玩家ID
    private float x;          // X坐标
    private float y;          // Y坐标
    private float dx;         // X方向速度分量
    private float dy;         // Y方向速度分量
    private boolean moving;   // 是否在移动
    private long timestamp;   // 时间戳
    private long serverFrame; // 服务器帧号
    
    // Getters and Setters
    public long getId() {
        return id;
    }
    
    public void setId(long id) {
        this.id = id;
    }
    
    public float getX() {
        return x;
    }
    
    public void setX(float x) {
        this.x = x;
    }
    
    public float getY() {
        return y;
    }
    
    public void setY(float y) {
        this.y = y;
    }
    
    public float getDX() {
        return dx;
    }
    
    public void setDX(float dx) {
        this.dx = dx;
    }
    
    public float getDY() {
        return dy;
    }
    
    public void setDY(float dy) {
        this.dy = dy;
    }
    
    public boolean isMoving() {
        return moving;
    }
    
    public void setMoving(boolean moving) {
        this.moving = moving;
    }
    
    public long getTimestamp() {
        return timestamp;
    }
    
    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
    
    public long getServerFrame() {
        return serverFrame;
    }
    
    public void setServerFrame(long serverFrame) {
        this.serverFrame = serverFrame;
    }
    
    @Override
    public String toString() {
        return "PlayerState{" +
                "id=" + id +
                ", x=" + x +
                ", y=" + y +
                ", dx=" + dx +
                ", dy=" + dy +
                ", moving=" + moving +
                ", serverFrame=" + serverFrame +
                "}";
    }
}
